<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo (L("home_title")); ?></title>
<link rel="stylesheet" type="text/css" href="../Public/css/info.css" />
<script type="text/javascript" src="__PUBLIC__/js/utils.js"></script>
<script type="text/javascript" src="../Public/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../Public/js/common.js"></script>
<script type="text/javascript" src="../Public/js/jquery.form.js"></script>
<script type="text/javascript" src="../Public/js/jquery.validate.js"></script>
</head>
<body>
<div class="so_main">

<div id="result" class="result none"></div>
<div class="mainbox">
    <div id="nav" class="mainnav_title">
        <div id="lang"><a><?php if(($mode) == "1"): ?>新增<?php else: ?>修改<?php endif; ?>功能</a></div>
        <ul><a href="__URL__/index">返回列表</a></ul>
    </div>
</div>
<form name="myform" id="myform" action="__URL__/save" method="post">
    <table cellpadding=0 cellspacing=0 class="table_form" width="90%">
        <tr>
            <th width="15%" ><font color="red">*</font>父级分类:</th>
            <td width="80%" id="box_pid">
                <select name="pid" id="pid" onchange="catChanged()" class="">
                    <option value="0">顶级分类</option>
                    <?php echo ($cat_select); ?>
                </select>
            </td>
        </tr>
        <tr>
            <th width="15%" ><font color="red">*</font>功能名称:</th>
            <td width="80%" id="box_mc">
                <input type="text" class="input-text " validate=" minlength:1, maxlength:20, required:true" name="mc"  id="mc" value="<?php if(isset($vo)): echo ($vo["mc"]); endif; ?>" size="22"  />
            </td>
        </tr>
        <tr>
            <th width="15%" ><font color="red">*</font>分组名称:</th>
            <td width="80%" id="box_group_name">
                <input type="text" class="input-text " validate=" minlength:1, maxlength:20, required:true" name="group_name"  id="group_name" value="<?php if(isset($vo)): echo ($vo["group_name"]); endif; ?>" size="22"  />
            </td>
        </tr>
        <tr>
            <th width="15%" ><font color="red">*</font>模块名称:</th>
            <td width="80%" id="box_module_name">
                <input type="text" class="input-text " validate=" minlength:1, maxlength:20, required:true" name="module_name"  id="module_name" value="<?php if(isset($vo)): echo ($vo["module_name"]); endif; ?>" size="22"  />
            </td>
        </tr>
        <tr>
            <th width="15%" ><font color="red">*</font>方法名称:</th>
            <td width="80%" id="box_action_name">
                <input type="text" class="input-text " validate=" minlength:1, maxlength:20, required:true" name="action_name"  id="action_name" value="<?php if(isset($vo)): echo ($vo["action_name"]); endif; ?>" size="22"  />
            </td>
        </tr>
        <tr>
            <th width="15%" >排序:</th>
            <td width="80%" id="box_sort_order">
        <input type="text" class="input-text " validate=" minlength:1, maxlength:4, required:true,digits:true" name="sort_order"  id="sort_order" value="<?php if(isset($vo)): echo ($vo["sort_order"]); else: ?>50<?php endif; ?>" size="22"  />
        </td>
        </tr>
        <tr>
            <th width="15%" >是否显示在权限设置中:</th>
            <td width="80%" id="box_is_state">
                <select name="is_state" id="is_state">
                    <option value="1" selected="selected">显示</option>
                    <option value="0">不显示</option>
                </select>
                是否权限控制：
                <select name="is_control" id="is_control">
                    <option value="1" selected="selected">控制</option>
                    <option value="0">不控制</option>
                </select>
            </td>
        </tr>
    </table>
    <div id="btnbox" class="btn">
        <input type="hidden"  name="mode" value="<?php echo ($mode); ?>" />
        <?php if(($mode) == "2"): ?><input type="hidden"  name="id" value="<?php echo ($vo["id"]); ?>" />
        <input type="hidden"  name="old_mc" value="<?php echo ($vo["mc"]); ?>" /><?php endif; ?>
        <INPUT TYPE="submit"  value="提交" class="button" >
        <input TYPE="reset"  value="取消" class="button">
    </div>
</form>
<script type="text/javascript">
    
        <?php if(isset($vo)): ?>$("#is_state").val("<?php echo ($vo["is_state"]); ?>");
    $("#is_control").val("<?php echo ($vo["is_control"]); ?>");<?php endif; ?>
</script>
</div>

    </body>
</html>